package com.iplant.mes.service.po.sfc;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.join.DBJoin;
import com.iplant.base.utils.annotation.po.DBBasePO;

import java.io.Serializable;

/**
 * 工件检验环境参数记录
 *
 * @author YouWang·Peng
 * 2024-03-25 11:23:13
 */
@DBBasePO(TableName = "sfc_ipt_environment_record", CheckName = {"Code", "TaskIPTID"}, Schemas = DBSchemas.MES,
        CodeAuto = true, CodePrefix = "SIER--{yyMMdd}-", CodeNum = 4, Name = false, Active = false)
public class SFCIPTEnvironmentRecord extends BasePO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自检单ID
     */
    @DBCondition
    @DBField
    public int TaskIPTID = 0;

    /**
     * 自检单编号
     */
    @DBCondition
    @DBJoin(name = "Code", tableName = "sfc_task_ipt", tableAsName = "ipt1", Schemas = DBSchemas.MES, MainTableField
            = "TaskIPTID")
    public String TaskIPTCode = "";

    /**
     * 温度
     */
    @DBField
    public float Temperature = 0.0f;

    /**
     * 湿度
     */
    @DBField
    public float Humidity = 0.0f;

    /**
     * 洁净度
     */
    @DBField
    public float Cleanliness = 0.0f;

    public SFCIPTEnvironmentRecord() {
    }

    public SFCIPTEnvironmentRecord(int taskIPTID, float temperature, float humidity, float cleanliness) {
        TaskIPTID = taskIPTID;
        Temperature = temperature;
        Humidity = humidity;
        Cleanliness = cleanliness;
    }

    @JsonProperty("TaskIPTID")
    public int getTaskIPTID() {
        return TaskIPTID;
    }

    public void setTaskIPTID(int taskIPTID) {
        TaskIPTID = taskIPTID;
    }

    @JsonProperty("TaskIPTCode")
    public String getTaskIPTCode() {
        return TaskIPTCode;
    }

    public void setTaskIPTCode(String taskIPTCode) {
        TaskIPTCode = taskIPTCode;
    }

    @JsonProperty("Temperature")
    public float getTemperature() {
        return Temperature;
    }

    public void setTemperature(float temperature) {
        Temperature = temperature;
    }

    @JsonProperty("Humidity")
    public float getHumidity() {
        return Humidity;
    }

    public void setHumidity(float humidity) {
        Humidity = humidity;
    }

    @JsonProperty("Cleanliness")
    public float getCleanliness() {
        return Cleanliness;
    }

    public void setCleanliness(float cleanliness) {
        Cleanliness = cleanliness;
    }

}